var account_regex = new RegExp(".+/useraccount/*.*")

document.write('<div class="login_box">')
if(account_regex.test(document.URL)){
	document.write("<form action='index.php' method='post'>")
} else{
	document.write('<form action="useraccount/" method="post">')
}
document.write('Log-in ID: <input type="textbox" name="username" /> ')
document.write('Password: <input type="password" name="password" />')
document.write('<input type="submit" value="Log-in" />')
document.write("</form>")
document.write("</div>")